<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:77:"D:\xampp\htdocs\thinkphp5\public/../application/index\view\teacher\index.html";i:1470044312;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>教师管理</title>
</head>
<body>
    <table>
        <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>邮箱</th>
            <th>用户名</th>
        </tr>
		<?php if(is_array($teachers) || $teachers instanceof \think\Collection): $key = 0; $__LIST__ = $teachers;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$teacher): $mod = ($key % 2 );++$key;?>
        <tr>
            <td><?php echo $key; ?></td>
            <td><?php echo $teacher->getData('name'); ?></td>
            <td><?php if($teacher->getData("sex") == '1'): ?>男<?php else: ?>女<?php endif; ?></td>
            <td><?php echo $teacher->getData('email'); ?></td>
            <td><?php echo $teacher->getData('username'); ?></td>
        </tr>
		<?php endforeach; endif; else: echo "" ;endif; ?>
    </table>
	<?php echo var_dump($teachers); ?>
</body>
</html>